//
//  SegmentControlViewController.m
//  SegmentControl
//

#import "SegmentControlViewController.h"

@implementation SegmentControlViewController

- (void)viewDidLoad {
	
	NSArray *arrSegments = [[NSArray alloc] initWithObjects:
							[NSString stringWithString:@"0"],
							[NSString stringWithString:@"1"],
							[NSString stringWithString:@"2"], nil];
	
	UISegmentedControl *mySegment = [[UISegmentedControl alloc]
									 initWithItems:arrSegments];
	
	CGRect segmentRect = CGRectMake(10,50,300,40);
	[mySegment setFrame:segmentRect];
	
	[self.view addSubview:mySegment];
	[arrSegments release];
	[mySegment release];
}

- (void)dealloc {
    [super dealloc];
}

@end
